<template>
  <el-dialog
    title="题目审核"
    width="40%"
   :visible.sync="checkVisible">
    <el-form :model="form">
      <el-form-item >
        <el-radio-group v-model="form.publishState">
          <el-radio label="通过" value="1"></el-radio>
          <el-radio label="拒绝" value="0"></el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item >
        <el-input type="textarea" v-model="form.chkRemarks" placeholder="请输入审核意见"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button @click="checkVisible=false">取消</el-button>
        <el-button type="primary" @click="sure">确定</el-button>
      </el-form-item>
    </el-form>
  </el-dialog>
</template>

<script>
import { choiceCheck } from '@/api/hmmm/questions'
export default {
  data () {
    return {
      checkVisible: false,
      form: {},
      id: ''
    }
  },
  methods: {
    async sure () {
      const data = { id: this.id, ...this.form }
      await choiceCheck(data)
      this.$message.success('操作成功')
      this.$parent.getList()
    }
  }
}
</script>

<style scoped lang='scss'></style>
